Skip to content

Add campus filters to company hire pages#53

Open
duooppa wants to merge 1 commit into
Ashrockzzz2003:v2from
duooppa:codex/company-campus-filter
Open

Add campus filters to company hire pages#53
duooppa wants to merge 1 commit into
Ashrockzzz2003:v2from
duooppa:codex/company-campus-filter

Conversation

@duooppa

@duooppa duooppa commented May 24, 2026

Copy link
Copy Markdown

Summary

  • add campus MultiSelect filters to the admin and manager company detail pages
  • filter hired students by the campus prefix in their roll number
  • recompute section-wise hire totals from the filtered rows and reset the campus filter when switching batches

Fixes #22

Testing

  • ./node_modules/.bin/prettier --check 'app/dashboard/admin/company/[companyId]/page.js' 'app/dashboard/manager/company/[companyId]/page.js'
  • git diff --check
  • node -e "const fs=require('fs'); const parser=require('@babel/parser'); for (const f of ['app/dashboard/admin/company/[companyId]/page.js','app/dashboard/manager/company/[companyId]/page.js']) { parser.parse(fs.readFileSync(f,'utf8'), {sourceType:'module', plugins:['jsx']}); console.log('parsed', f); }"

Local environment notes

  • npm ci --dry-run is currently blocked because package-lock.json is out of sync with package.json (@types/react, typescript, and csstype).
  • npm run lint is currently blocked by the existing .eslintrc.json / ESLint 9 circular config issue.

@Ashrockzzz2003

Copy link
Copy Markdown
Owner

@duooppa can you share screenshots of the feature?

@duooppa

duooppa commented May 29, 2026

Copy link
Copy Markdown
Author

Sure, here are screenshots of the feature using sample/mock hire data since I don't have access to the production database.

The screenshots show:

  • all campuses before filtering
  • the campus selector with Coimbatore selected
  • the filtered result updating the section cards, chart, and hires table

All campuses

Campus selector with Coimbatore selected

Coimbatore filtered result


const [companyName, setCompanyName] = useState("");
const [selectedCampuses, setSelectedCampuses] = useState(null);
const campusList = campuses.map((campus) => ({

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why define it again? Can't we simply reuse the imported var?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add campus filter wherever possible.

2 participants